package com.eshop.modules.shop.rest;

import org.springframework.web.bind.annotation.GetMapping;
import java.io.IOException;
import org.springframework.http.HttpStatus;
import com.zhonghui.license.LicenseVerify;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping({ "/api" })
public class CheckController
{
    @GetMapping({ "/checklicense" })
    public ResponseEntity checklicense() throws IOException {
        final LicenseVerify licenseVerify = new LicenseVerify();
        final boolean verifyResult = licenseVerify.verify();
        return new ResponseEntity(verifyResult, HttpStatus.OK);
    }
}
